import http from '@/utils/http'
import type { ApiResponse } from '@/types/api'

// 消息请求参数接口
export interface Request {
    msgId: number;
    [property: string]: any;
}

// 标记所有消息为已读
export const readAllMessages = (): Promise<ApiResponse<any>> => {
    return http({
        url: '/user/appointment/readMsg',
        method: 'POST'
    })
}

// 标记单个消息为已读
export const readSingleMessage = (msgId: number): Promise<ApiResponse<any>> => {
    return http({
        url: `/user/appointment/readMsg/${msgId}`,
        method: 'POST'
    })
}
